﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.RefreshRate
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Runtime.CompilerServices;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Represents the display refresh rate. This is how many frames the display can show per second.</para>
  /// </summary>
  [NativeType("Runtime/Graphics/RefreshRate.h")]
  public struct RefreshRate : IEquatable<RefreshRate>
  {
    /// <summary>
    ///   <para>Numerator of the refresh rate fraction.</para>
    /// </summary>
    [RequiredMember]
    public uint numerator;
    /// <summary>
    ///   <para>Denominator of the refresh rate fraction.</para>
    /// </summary>
    [RequiredMember]
    public uint denominator;

    /// <summary>
    ///   <para>The numerical value of the refresh rate in hertz.</para>
    /// </summary>
    public double value
    {
      [MethodImpl((MethodImplOptions) 256)] get
      {
        return (double) this.numerator / (double) this.denominator;
      }
    }

    [MethodImpl((MethodImplOptions) 256)]
    public bool Equals(RefreshRate other)
    {
      return (int) this.numerator == (int) other.numerator && (int) this.denominator == (int) other.denominator;
    }
  }
}
